/*
    BibleNotebook - A bible reader software
    Copyright (C) 2014  Williams Fernando Lopez

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
 */

package com.simplebible.ui;

import com.simplebible.ui.components.MainPanel;

/**
 *
 * @author Williams Lopez
 */
public class Events {

    public static final String TOOGLE_PARALLEL_VIEW    = "view";
    public static final String TOOGLE_DICTIONARY_PANEL = "dict";
    public static final String TOOGLE_BOOKMARK_PANEL   = "bmrk";
    public static final String TOOGLE_NOTE_PANEL       = "note";
    public static final String TOOGLE_SINCRONIZATION   = "sinc";
    public static final String SHOW_GENERAL_CONFIG     = "conf";

    public static final String SHOW_SELECT_VERSE_PANEL   = "sver";
    public static final String SHOW_VERSION_CONFIG_PANEL = "vcon";
    public static final String NEXT_CHAPTER = "nchp";
    public static final String PREV_CHAPTER = "pchp";

    public static void execute(String event,MainPanel panel){
        if(TOOGLE_PARALLEL_VIEW.equals(event)){
            panel.toogleDualPanel();
        }else if(TOOGLE_DICTIONARY_PANEL.equals(event)){
            panel.toogleDictionaryPanel();
        }else if(TOOGLE_BOOKMARK_PANEL.equals(event)){
            panel.toogleBookMarkPanel();
        }else if(TOOGLE_NOTE_PANEL.equals(event)){
            panel.toogleNotePanel();
        }else if(TOOGLE_SINCRONIZATION.equals(event)){
            panel.toogleEnableSinc();
        }else if(SHOW_GENERAL_CONFIG.equals(event)){
            panel.showGeneralConfig();
        }else if(SHOW_SELECT_VERSE_PANEL.equals(event)){
            panel.showSelectVersePanel();
        }else if(SHOW_VERSION_CONFIG_PANEL.equals(event)){
            panel.showConfigVersionPanel();
        }else if(NEXT_CHAPTER.equals(event)){
            panel.nextChapter();
        }else if(PREV_CHAPTER.equals(event)){
            panel.prevChapter();
        }
    }


}
